from app.extensions import db

class HouseImage(db.Model):
    __tablename__ = 'house_images'
    imageid = db.Column(db.Integer, primary_key=True)
    houseid = db.Column(db.Integer, db.ForeignKey('houseinfo.houseid'), nullable=False)
    image_url = db.Column(db.String(255), nullable=False)
    is_cover = db.Column(db.Boolean, default=False)
    upload_time = db.Column(db.TIMESTAMP, server_default=db.func.current_timestamp())